package com.example.wastes.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.wastes.common.pojo.Message;
import com.example.wastes.common.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;


@Mapper
public interface UserMapper extends BaseMapper<User> {

    User SelectIntegral(@Param("id") Integer id);
    List<User> findall();
    List<User> findUserName(String username);
    @Select("select phone from tb_user where id=#{id}")
    User SelectPhone(@Param("id") Integer id);
//    @Insert("insert into tb_user(username,userimg) values (#{username},#{userimg})")
//    int saveUser(@Param("username") String username,@Param("userimg") String userimg);

    User tologin1(String username);
    int saveUser(@Param("username") String username,@Param("password") String password);

    User findName(String username);


    List<User> findByidAll(Integer id);

    //用户提现
    int updateMoney(Integer id);
}
